<template>
  <div>
    <h1>Count : {{ count || tellMe }}</h1>
  </div>
</template>

<script>
/* eslint-disable */
import { Observable } from 'rxjs';
import 'rxjs/add/observable/interval'
import 'rxjs/add/operator/filter'

export default {
  data() {
    return {
      count: 0,
    };
  },
  computed: {
    tellMe() {
      if (this.count == 10) {
        console.log('WKWKWKWKKW');
      }
    }
  },
  created () {
    const obs = Observable.interval(1000)
    obs
      .filter((value) => value % 2 == 0)
      .subscribe(
        (value) => this.count = value
    );
  },
};

</script>
